package com.cn.serverline.lineicp.productionLine.param;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 工序物料修改参数
 *
 * @author Gmr
 * @since 2024/7/31
 */
@Data
public class ProcessMaterialsEditParam {

	/**
	 * ID
	 */
	@ApiModelProperty(value = "ID", required = true)
	@JsonSerialize(using= ToStringSerializer.class)
	@NotNull(message = "ID不能为空")
	private Long id;

	/**
	 * 代号
	 */
	@ApiModelProperty(value = "代号", required = true)
	@NotBlank(message = "代号不能为空")
	private String code;

	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称", required = true)
	@NotBlank(message = "名称不能为空")
	private String name;

	/**
	 * 数量
	 */
	@ApiModelProperty(value = "数量", required = true)
	@JsonSerialize(using= ToStringSerializer.class)
	@NotNull(message = "数量不能为空")
	private Long materialNumber;

	/**
	 * 数量单位
	 */
	@ApiModelProperty(value = "数量单位", required = true)
	@NotBlank(message = "数量单位不能为空")
	private String quantityUnit;

	/**
	 * 是否组件
	 */
	@ApiModelProperty(value = "是否组件", required = true)
	@JsonSerialize(using= ToStringSerializer.class)
	@NotNull(message = "是否组件不能为空")
	private Long isComponent;

	/**
	 * 是否主零件
	 */
	@ApiModelProperty("是否主零件")
	@JsonSerialize(using= ToStringSerializer.class)
	private Long isMainPart;

	/**
	 * 备注
	 */
	@ApiModelProperty("备注")
	private String remark;
}
